package com.ppch.wuwamanus.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ppch.wuwamanus.model.dto.user.UserLoginRequest;
import com.ppch.wuwamanus.model.dto.user.UserModifyPassWord;
import com.ppch.wuwamanus.model.dto.user.UserQueryRequest;
import com.ppch.wuwamanus.model.dto.user.UserRegisterRequest;
import com.ppch.wuwamanus.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ppch.wuwamanus.model.vo.LoginUserVO;
import com.ppch.wuwamanus.model.vo.UserVO;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.multipart.MultipartFile;

/**
* @author 鲸落
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-08-11 14:11:25
*/
public interface UserService extends IService<User> {

    long userRegister(UserRegisterRequest userRegisterRequest);

    LoginUserVO userLogin(UserLoginRequest userLoginRequest, HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    boolean userLogout(HttpServletRequest request);

    LoginUserVO getLoginUserVO(User user);

    UserVO getUserVO(User user);

    QueryWrapper<User> getUserQueryWrapper(UserQueryRequest userQueryRequest);

    boolean isAdmin(User user);

    boolean changePassword(UserModifyPassWord userModifyPassWord, HttpServletRequest request);

    boolean resetPassword(User loginUser, String newPassword, String checkPassword);

    String updateUserAvatar(MultipartFile multipartFile, Long id, HttpServletRequest request);
}
